<layout name="page" />
<block name="content">
	<style>
		.avtar {
			width: 80px;
			height: 80px;
		}
	</style>
	{:widget('page_header/simple',array('name'=>'基本资料','search'=>'N'))}
	<div class="frame" style="height:640px;">
		<form id="form_data" name="form_data" method="post" >
			<input type="hidden" id="ajax" name="ajax" value="1">
			<input type="hidden" id="save_name" name="save_name">
			<input type="hidden" name="id" id="id" value="{$vo.id}">
			<input type="hidden" name="signature" id="signature" >
			<input type="hidden" name="opmode" id="opmode" value="edit">
			<div class="box">
				<label class="input-label">头像:</label>
				<img id="pic" class="avtar" src="{$vo.pic}" onclick="select_avatar()">
			</div>
			<div class="box">
				<label class="input-label">姓名*：</label>
				<input class="input w19" type="text" id="name" name="name"  value="{$vo.name}"   check="required" info="请输入姓名" readonly="readonly">
			</div>
			<div class="box">
				<label class="input-label">性别*：</label>
				<select name="sex" id="sex" class="select w10">
					<option  value="male">男</option>
					<option value="female">女</option>
				</select>
				<i class="icon"></i>
			</div>
			<div class="box">
				<label class="input-label">生日*：</label>
				<div class="input-inline">
					<input  type="text" id="birthday" name="birthday"  class="input-date input" value="{$vo.birthday}" >
				</div>
			</div>
			<div class="box">
				<label class="input-label">部门*：</label>
				<div class="input-static">
					{$vo.dept_name}
				</div>
			</div>
			<div class="box">
				<label class="input-label">职位*：</label>
				<div class="input-static">
					{$vo.position_name}
				</div>
			</div>

			<div class="box">
				<label class="input-label">办公室电话*：</label>
				<div class="input-block col-19">
					<input type="text" id="office_tel" name="office_tel" class="input" value="{$vo.office_tel}">
				</div>
			</div>
			<div class="box">
				<label class="input-label">移动电话*：</label>
				<div class="input-block col-19">
					<input type="text" id="mobile_tel" name="mobile_tel" class="input" value="{$vo.mobile_tel}">
				</div>
			</div>
			<div class="box">
				<label class="input-label">电子邮箱*：</label>

				<input type="text" id="email" name="email" class="input" value="{$vo.email}">
			</div>

			<div class="box">
				<label class="input-label">负责业务*：</label>

				<input type="text" id="duty" name="duty" class="input" value="{$vo.duty}">
			</div>
			<div class="box">
				<label class="input-label"></label>
				<a class="btn btn-normal" onclick="save()">保存</a>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
			var $ = layui.jquery;
			var fn = {
				select_avatar : function() {
					if ($("#id").val().length == 0) {
						layer.msg("请选择用户");
						return false;
					}
					winopen("{:url('popup/avatar')}?id={$vo.id}", 560, 470);
				},
				save : function() {
					send_form("form_data", "{:url('save')}", "{:url('index')}", function(ret) {
						if (ret.status) {
							layer.msg(ret.info, {
								time : 1200
							}, function() {
								location.reload(true);
							});
						} else {
							layer.msg(ret.info);
							return false;
						}
					});
				}
			};
			win_exp(fn);

			set_return_url(null);
			set_val('sex', '{$vo.sex}');
		});
	</script>

</block>